<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('user/shops')}">店长列表</a></li>
			<li><a href="{:url('user/shopsadd')}">店长添加</a></li>
			<li class="active"><a href="#">成为店长</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('User/becomePost')}">
			<div class="form-group">
				<label  class="col-sm-2 control-label"><span class="form-required">*</span>真实姓名</label>
				<div class="col-md-6 col-sm-10">
					<input type="hidden" name="id" value="{$ret1.user_guid}" />
					{$ret1.real_name}
				</div>
			</div>
			<div class="form-group">
				<label  class="col-sm-2 control-label"><span class="form-required">*</span>身份证号</label>
				<div class="col-md-6 col-sm-10">
					{$ret1.id_card}
				</div>
			</div>
			<div class="form-group">
				<label  class="col-sm-2 control-label"><span class="form-required">*</span>代理商平台名称</label>
				<div class="col-md-6 col-sm-10">
					<select name="brand_name" onchange="shoptype($(this).val())">
						<option value="">请选择</option>
						<volist name="ret" id="vo">
							<option value="{$vo.user_id}">{$vo.brand_name}</option>
						</volist>
					</select>
					<span id="shop_type"></span>
					</select>

				</div>
			</div>
			<div class="form-group">
				<label for="mobile" class="col-sm-2 control-label"><span class="form-required">*</span>手机号</label>
				<div class="col-md-6 col-sm-10">
					{$ret1.mobile}
				</div>
			</div>
			<div class="form-group">
				<label for="incode" class="col-sm-2 control-label"><span class="form-required">*</span>激活码</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="incode" name="incode">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" class="btn btn-primary js-ajax-submit">成为店长</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
<script>
    function shoptype(id){
        if(id !=''){
            $.post("{:url('User/getShops')}",{'id':id},function (date){
                var html = "";
                html+="　　店铺：<select id='shopid' name='shopid'>";
                html+="<option value=''>请选择店铺</option>";
                for(var i=0;i<date.length;i++){
                    html+="<option value="+date[i].re_guid+">"+date[i].shop_name+"</option>";
                }
                html+='</secect>';
                $('#shop_type').html(html);
            });
        }else{
            $('#shop_type').empty();
        }

    }
</script>
</html>